import http from '../utils/request';

const { get, post } = http('admin');

// 获取用户列表
export const getList = params => get('/api/user/user', params);
// 获取用户详情
export const getUser = params => get(`/api/user/user/${params.name}`);
// 新增用户
export const addUser = params => post('/api/user/user/createUser', params);
// 编辑用户
export const editUser = params => post('/api/user/user/updateUser', params);
// 删除用户
export const delUser = params => post('/api/user/user/deleteUser', params);
// 管理员修改密码
export const updatePassword = params => post('/api/user/user/changePassword', params);
// 修改自己密码
export const changeMyPassword = params => post('/api/user/user/changeMyPassword', params);
// 激活用户
export const activeUser = params => post(`/api/user/user/active/${params.name}`, params);
// 禁用用户
export const forbiddenUser = params => post(`/api/user/user/forbidden/${params.name}`, params);
// 拉去用户自己到信息
export const userProfile = params => post('/api/user/user/profile', params);
// 获取绑定的二维码图片
export const bindQrCode = params => get('/api/user/user/bindQrCode', params);



